-
-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] Support non-serializable (part) item Return Orders #8400
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@SchrodingersGat I was not sure how to add a parameter to disable/enable this. If you could point me to the right location, I could try adding it. |
@baltuonis thanks for submitting the PR! This approach is not exactly what I had in mind, what I envisioned was that you would simply remove the restriction that the returned item had to be serialized: InvenTree/src/backend/InvenTree/order/models.py Line 2408 in feefa60
What you have implemented here is a lot more complex, and I am supposing that what you actually want to be able to achieve is to create a "return order" for a stock item which does not "exist" in the system? It that correct? For example, if a non-serialized item has been shipped to a customer, that item should be able to be returned via the existing processes, if we allow "non serialized" items to be added to a ReturnOrder via the Perhaps you can expand a bit more on what exactly you are trying to achieve, based on the context above? |
@SchrodingersGat right, so this was my first "hold my beer, I'm gonna make a PR in 15 mins" approach. If I want to return them, I have to create a bunch of stock items for the same product. Now imagine, we have return orders with 17 units of item1, 5 units of item2, etc. That's where I had to add Another problem (as you've suggested) is that sometimes there are items that are not present in the main warehouse and we have to issue an RO that includes them... That's where I added So then I've realized that adding those fields + all the surrounding logic inside a That's why in the end I've added a separate section with a new model. I think that could be turned off/on with a flag in admin settings. |
@baltuonis can I suggest a simpler approach, which I think should work for you here. Let's say you have sent a quantity of 100x books to a customer. This appears as a single StockItem (with quantity 100x) at the customer. The customer wants to return 15 of these books. Rather than adding another layer of complication with a new model that maps a "quantity" of the item to be returned, I'd suggest the following process:
This utilizes processes which already exist, and does not require this additional alternative process. To make this happen you would need to make at least the following adjustments to the codebase: a) Allow stock items which are "at" a customer to be "split" - currently this is prevented, I think Does this make sense? I strongly feel it is a cleaner alternative which will work better for you anyway |
Adding support for non-serializable (part) item Return Orders
Feature request: #8372